class Dog extends Animal implements Trainable, Swimmable {
    private String breed;

    // 构造方法
    public Dog(String name, int age, String breed) {
        super(name, age);
        this.breed = breed;
    }

    // get方法
    public String getBreed() {
        return breed;
    }

    @Override
    public void makeSound() {
        System.out.println("汪汪汪");
    }

    @Override
    public void train() {
        System.out.println("狗正在接受训练");
    }

    @Override
    public void swim() {
        System.out.println("狗正在游泳");
    }
}